class ProductProductionorder {

  String? id;
  String? planid;
  String? productiontype;
  String? workshop;
  String? workshopname;
  String? productgroup;
  String? productspec;
  String? productname;
  String? productstyle;
  String? sotype;
  String? sono;
  String? soitem;
  String? planqty;
  String? unitname;
  String? productused;
  String? priority;
  String? sparycolor;
  String? printmode;
  String? packingmode;
  String? plandate;
  String? dlvdate;
  String? customergroup;
  String? custname;
  String? contractno;
  String? province;
  String? contacts;
  String? phone;
  String? national;
  String? city;
  String? salesman;
  String? unitprice;
  String? soprice;
  String? requirement;
  String? specialremark;
  String? remark;
  String? dlvydddr;
  String? createUid;
  String? createDate;
  String? writeUid;
  String? writeDate;

  ProductProductionorder({
    this.id,
    this.planid,
    this.productiontype,
    this.workshop,
    this.workshopname,
    this.productgroup,
    this.productspec,
    this.productname,
    this.productstyle,
    this.sotype,
    this.sono,
    this.soitem,
    this.planqty,
    this.unitname,
    this.productused,
    this.priority,
    this.sparycolor,
    this.printmode,
    this.packingmode,
    this.plandate,
    this.dlvdate,
    this.customergroup,
    this.custname,
    this.contractno,
    this.province,
    this.contacts,
    this.phone,
    this.national,
    this.city,
    this.salesman,
    this.unitprice,
    this.soprice,
    this.requirement,
    this.specialremark,
    this.remark,
    this.dlvydddr,
    this.createUid,
    this.createDate,
    this.writeUid,
    this.writeDate,
  });

  ProductProductionorder copyWith({
    String? id,
    String? planid,
    String? productiontype,
    String? workshop,
    String? workshopname,
    String? productgroup,
    String? productspec,
    String? productname,
    String? productstyle,
    String? sotype,
    String? sono,
    String? soitem,
    String? planqty,
    String? unitname,
    String? productused,
    String? priority,
    String? sparycolor,
    String? printmode,
    String? packingmode,
    String? plandate,
    String? dlvdate,
    String? customergroup,
    String? custname,
    String? contractno,
    String? province,
    String? contacts,
    String? phone,
    String? national,
    String? city,
    String? salesman,
    String? unitprice,
    String? soprice,
    String? requirement,
    String? specialremark,
    String? remark,
    String? dlvydddr,
    String? createUid,
    String? createDate,
    String? writeUid,
    String? writeDate,
  }) {
    return new ProductProductionorder(
      id: id ?? this.id,
      planid: planid ?? this.planid,
      productiontype: productiontype ?? this.productiontype,
      workshop: workshop ?? this.workshop,
      workshopname: workshopname ?? this.workshopname,
      productgroup: productgroup ?? this.productgroup,
      productspec: productspec ?? this.productspec,
      productname: productname ?? this.productname,
      productstyle: productstyle ?? this.productstyle,
      sotype: sotype ?? this.sotype,
      sono: sono ?? this.sono,
      soitem: soitem ?? this.soitem,
      planqty: planqty ?? this.planqty,
      unitname: unitname ?? this.unitname,
      productused: productused ?? this.productused,
      priority: priority ?? this.priority,
      sparycolor: sparycolor ?? this.sparycolor,
      printmode: printmode ?? this.printmode,
      packingmode: packingmode ?? this.packingmode,
      plandate: plandate ?? this.plandate,
      dlvdate: dlvdate ?? this.dlvdate,
      customergroup: customergroup ?? this.customergroup,
      custname: custname ?? this.custname,
      contractno: contractno ?? this.contractno,
      province: province ?? this.province,
      contacts: contacts ?? this.contacts,
      phone: phone ?? this.phone,
      national: national ?? this.national,
      city: city ?? this.city,
      salesman: salesman ?? this.salesman,
      unitprice: unitprice ?? this.unitprice,
      soprice: soprice ?? this.soprice,
      requirement: requirement ?? this.requirement,
      specialremark: specialremark ?? this.specialremark,
      remark: remark ?? this.remark,
      dlvydddr: dlvydddr ?? this.dlvydddr,
      createUid: createUid ?? this.createUid,
      createDate: createDate ?? this.createDate,
      writeUid: writeUid ?? this.writeUid,
      writeDate: writeDate ?? this.writeDate,
    );
  }

  @override
  String toString() {
    return '''ProductProductionorder{
      id: id,
      planid: planid,
      productiontype: productiontype,
      workshop: workshop,
      workshopname: workshopname,
      productgroup: productgroup,
      productspec: productspec,
      productname: productname,
      productstyle: productstyle,
      sotype: sotype,
      sono: sono,
      soitem: soitem,
      planqty: planqty,
      unitname: unitname,
      productused: productused,
      priority: priority,
      sparycolor: sparycolor,
      printmode: printmode,
      packingmode: packingmode,
      plandate: plandate,
      dlvdate: dlvdate,
      customergroup: customergroup,
      custname: custname,
      contractno: contractno,
      province: province,
      contacts: contacts,
      phone: phone,
      national: national,
      city: city,
      salesman: salesman,
      unitprice: unitprice,
      soprice: soprice,
      requirement: requirement,
      specialremark: specialremark,
      remark: remark,
      dlvydddr: dlvydddr,
      createUid: createUid,
      createDate: createDate,
      writeUid: writeUid,
      writeDate: writeDate,
    }''';
  }

  @override
  bool operator ==(Object other) => identical(this, other) || (
      other is ProductProductionorder &&
          runtimeType == other.runtimeType
          && id== other.id
          && planid== other.planid
          && productiontype== other.productiontype
          && workshop== other.workshop
          && workshopname== other.workshopname
          && productgroup== other.productgroup
          && productspec== other.productspec
          && productname== other.productname
          && productstyle== other.productstyle
          && sotype== other.sotype
          && sono== other.sono
          && soitem== other.soitem
          && planqty== other.planqty
          && unitname== other.unitname
          && productused== other.productused
          && priority== other.priority
          && sparycolor== other.sparycolor
          && printmode== other.printmode
          && packingmode== other.packingmode
          && plandate== other.plandate
          && dlvdate== other.dlvdate
          && customergroup== other.customergroup
          && custname== other.custname
          && contractno== other.contractno
          && province== other.province
          && contacts== other.contacts
          && phone== other.phone
          && national== other.national
          && city== other.city
          && salesman== other.salesman
          && unitprice== other.unitprice
          && soprice== other.soprice
          && requirement== other.requirement
          && specialremark== other.specialremark
          && remark== other.remark
          && dlvydddr== other.dlvydddr
          && createUid== other.createUid
          && createDate== other.createDate
          && writeUid== other.writeUid
          && writeDate== other.writeDate
   );


  factory ProductProductionorder.fromMap(Map<String, dynamic> map) {
    return new ProductProductionorder(
      id: map['id']!=false?map['id'].toString() as String?:"",
      planid: map['planid']!=false?map['planid'].toString() as String?:"",
      productiontype: map['productiontype']!=false?map['productiontype'].toString() as String?:"",
      workshop: map['workshop']!=false?map['workshop'].toString() as String?:"",
      workshopname: map['workshopname']!=false?map['workshopname'].toString() as String?:"",
      productgroup: map['productgroup']!=false?map['productgroup'].toString() as String?:"",
      productspec: map['productspec']!=false?map['productspec'].toString() as String?:"",
      productname: map['productname']!=false?map['productname'].toString() as String?:"",
      productstyle: map['productstyle']!=false?map['productstyle'].toString() as String?:"",
      sotype: map['sotype']!=false?map['sotype'].toString() as String?:"",
      sono: map['sono']!=false?map['sono'].toString() as String?:"",
      soitem: map['soitem']!=false?map['soitem'].toString() as String?:"",
      planqty: map['planqty']!=false?map['planqty'].toString() as String?:"",
      unitname: map['unitname']!=false?map['unitname'].toString() as String?:"",
      productused: map['productused']!=false?map['productused'].toString() as String?:"",
      priority: map['priority']!=false?map['priority'].toString() as String?:"",
      sparycolor: map['sparycolor']!=false?map['sparycolor'].toString() as String?:"",
      printmode: map['printmode']!=false?map['printmode'].toString() as String?:"",
      packingmode: map['packingmode']!=false?map['packingmode'].toString() as String?:"",
      plandate: map['plandate']!=false?map['plandate'].toString() as String?:"",
      dlvdate: map['dlvdate']!=false?map['dlvdate'].toString() as String?:"",
      customergroup: map['customergroup']!=false?map['customergroup'].toString() as String?:"",
      custname: map['custname']!=false?map['custname'].toString() as String?:"",
      contractno: map['contractno']!=false?map['contractno'].toString() as String?:"",
      province: map['province']!=false?map['province'].toString() as String?:"",
      contacts: map['contacts']!=false?map['contacts'].toString() as String?:"",
      phone: map['phone']!=false?map['phone'].toString() as String?:"",
      national: map['national']!=false?map['national'].toString() as String?:"",
      city: map['city']!=false?map['city'].toString() as String?:"",
      salesman: map['salesman']!=false?map['salesman'].toString() as String?:"",
      unitprice: map['unitprice']!=false?map['unitprice'].toString() as String?:"",
      soprice: map['soprice']!=false?map['soprice'].toString() as String?:"",
      requirement: map['requirement']!=false?map['requirement'].toString() as String?:"",
      specialremark: map['specialremark']!=false?map['specialremark'].toString() as String?:"",
      remark: map['remark']!=false?map['remark'].toString() as String?:"",
      dlvydddr: map['dlvydddr']!=false?map['dlvydddr'].toString() as String?:"",
      createUid: map['create_uid']!=false?map['create_uid'].toString() as String?:"",
      createDate: map['create_date']!=false?map['create_date'].toString() as String?:"",
      writeUid: map['write_uid']!=false?map['write_uid'].toString() as String?:"",
      writeDate: map['write_date']!=false?map['write_date'].toString() as String?:"",
    );
  }

  Map<String, dynamic> toMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
      'planid': this.planid,
      'productiontype': this.productiontype,
      'workshop': this.workshop,
      'workshopname': this.workshopname,
      'productgroup': this.productgroup,
      'productspec': this.productspec,
      'productname': this.productname,
      'productstyle': this.productstyle,
      'sotype': this.sotype,
      'sono': this.sono,
      'soitem': this.soitem,
      'planqty': this.planqty,
      'unitname': this.unitname,
      'productused': this.productused,
      'priority': this.priority,
      'sparycolor': this.sparycolor,
      'printmode': this.printmode,
      'packingmode': this.packingmode,
      'plandate': this.plandate,
      'dlvdate': this.dlvdate,
      'customergroup': this.customergroup,
      'custname': this.custname,
      'contractno': this.contractno,
      'province': this.province,
      'contacts': this.contacts,
      'phone': this.phone,
      'national': this.national,
      'city': this.city,
      'salesman': this.salesman,
      'unitprice': this.unitprice,
      'soprice': this.soprice,
      'requirement': this.requirement,
      'specialremark': this.specialremark,
      'remark': this.remark,
      'dlvydddr': this.dlvydddr,
      'createUid': this.createUid,
      'createDate': this.createDate,
      'writeUid': this.writeUid,
      'writeDate': this.writeDate,
    } as Map<String, dynamic>;
  }

  List toDomainList() {
    List list = [
      if(this.sono!=null&&this.sono!='')['sono','=',this.sono],
      if(this.planid!=null&&this.planid!='')['planid','=',this.planid],
    ] as List;
    // ignore: unnecessary_cast
    return list;
  }

  Map<String, dynamic> toOdooMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
      'planid': this.planid,
      'productiontype': this.productiontype,
      'workshop': this.workshop,
      'workshopname': this.workshopname,
      'productgroup': this.productgroup,
      'productspec': this.productspec,
      'productname': this.productname,
      'productstyle': this.productstyle,
      'sotype': this.sotype,
      'sono': this.sono,
      'soitem': this.soitem,
      'planqty': this.planqty,
      'unitname': this.unitname,
      'productused': this.productused,
      'priority': this.priority,
      'sparycolor': this.sparycolor,
      'printmode': this.printmode,
      'packingmode': this.packingmode,
      'plandate': this.plandate,
      'dlvdate': this.dlvdate,
      'customergroup': this.customergroup,
      'custname': this.custname,
      'contractno': this.contractno,
      'province': this.province,
      'contacts': this.contacts,
      'phone': this.phone,
      'national': this.national,
      'city': this.city,
      'salesman': this.salesman,
      'unitprice': this.unitprice,
      'soprice': this.soprice,
      'requirement': this.requirement,
      'specialremark': this.specialremark,
      'remark': this.remark,
      'dlvydddr': this.dlvydddr,
      'create_uid': this.createUid,
      'create_date': this.createDate,
      'write_uid': this.writeUid,
      'write_date': this.writeDate,
    } as Map<String, dynamic>;
  }

//</editor-fold>

}